package com.atguigu.gmall.realtime.utils

import java.io.InputStreamReader
import java.util.Properties

/**
 * Date:2021/3/17
 * Author:csw
 * Description:
 */
object PropertiesUtil {
  def load(propertieName:String): Properties ={
    val prop=new Properties()
    prop.load(new InputStreamReader(Thread.currentThread().getContextClassLoader.getResourceAsStream(propertieName) , "UTF-8"))
    prop
  }

  def main(args: Array[String]): Unit = {
    println(PropertiesUtil.load("db.properties").getProperty("redis.port"))
  }
}
